<html>
<head>
 <!--
    CPAINT (Cross-Platform Asynchronous INterface Toolkit) - Version 2

    http://sf.net/projects/cpaint
    
    released under the terms of the GPL
    see http://www.fsf.org/licensing/licenses/gpl.txt for details

    authors:  Paul Sullivan <wiley14@gmail.com>, Dominique Stender <dstender@st-webdevelopment.de>
    Copyright (c) 2005-2006 Paul Sullivan, Dominique Stender - http://sf.net/projects/cpaint
  //-->
  <title>cpaint2 proxy test - google</title>
  <script type="text/javascript" src="../../cpaint2.inc.compressed.js"></script>
  <script type="text/javascript">
  <!--
    var cp = new cpaint();
    cp.set_response_type('text');
    cp.set_proxy_url('../../cpaint2_proxy.php');
    cp.set_use_cpaint_api(false);
  
    function ping() {
      cp.call('http://www.google.com/search', '', response, 'q=' + document.getElementById('query').value, 'hl=en');
      return false;
    }

    function response(result) {
      document.getElementById('response').innerHTML = result;
    }
  //-->
  </script>
</head>
<body>
  With CPAINT you can even perform remote requests to services that have not
  been implemented with CPAINT: in this example that's Google.<br />
  <br />
  The only difference is that you must not assign a cpaint remote method on call() 
  AND you have to provide parameter names for all arguments passed to the remote service.<br />
  <br />
  <form action="#" onSubmit="return ping()">
    <input type="text" id="query" value="" />
    <input type="submit" value="query google" />
  </form>
  <div id="response"></div>
</body>
</html>
